#ifndef __MUTEXCOND_H__
#define __MUTEXCOND_H__

class MutexCond
{
public:
    MutexCond(const char * const name =0) { pthread_cond_init(&mcond_, NULL);};
    ~MutexCond() {};
    inline void wait(coil::Mutex &cmutex)
    {
        ::pthread_cond_wait( &mcond_, &cmutex.mutex_);
    }
    inline void broadcast()
    {
        ::pthread_cond_broadcast( &mcond_ );
    }
    pthread_cond_t mcond_;
private:
    MutexCond(const MutexCond&);
    MutexCond& operator=(const MutexCond&);
};

#endif
